-
Notifications
You must be signed in to change notification settings - Fork 423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve calculation of the scale
parameter for the uniform float distribution.
#1301
base: master
Are you sure you want to change the base?
Improve calculation of the scale
parameter for the uniform float distribution.
#1301
Conversation
Quick question from a bird's eye perspective: |
In the few tests that I did, In the meantime, I'm marking this PR as draft. |
Hello - sorry for the late comment. I don't have an example off the top of my head, but I can say that I saw the same behaviour with new_inclusive (but with different constants). |
@WarrenWeckesser is this still on your to-do list? |
The calculation of
scale
for the uniform float distribution is moved to its own function and updated to avoid the problem that was pointed out in gh-1299. As part of the new implementation, the new utility methodslt_mask()
,increase_masked()
andutils_next_down()
are added to theFloatSIMDUtils
traits.The improved method for computing the scale is explained in the comments in the function
compute_scale()
.